\(\int \frac {\cos (a+b x^n)}{x} \, dx\) [69]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [C] (verification not implemented)
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 12, antiderivative size = 26 \[ \int \frac {\cos \left (a+b x^n\right )}{x} \, dx=\frac {\cos (a) \operatorname {CosIntegral}\left (b x^n\right )}{n}-\frac {\sin (a) \text {Si}\left (b x^n\right )}{n} \]

[Out]

Ci(b*x^n)*cos(a)/n-Si(b*x^n)*sin(a)/n

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3459, 3457, 3456} \[ \int \frac {\cos \left (a+b x^n\right )}{x} \, dx=\frac {\cos (a) \operatorname {CosIntegral}\left (b x^n\right )}{n}-\frac {\sin (a) \text {Si}\left (b x^n\right )}{n} \]

[In]

Int[Cos[a + b*x^n]/x,x]

[Out]

(Cos[a]*CosIntegral[b*x^n])/n - (Sin[a]*SinIntegral[b*x^n])/n

Rule 3456

Int[Sin[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[SinIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3457

Int[Cos[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[CosIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3459

Int[Cos[(c_) + (d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Dist[Cos[c], Int[Cos[d*x^n]/x, x], x] - Dist[Sin[c], Int[Si
n[d*x^n]/x, x], x] /; FreeQ[{c, d, n}, x]

Rubi steps \begin{align*} \text {integral}& = \cos (a) \int \frac {\cos \left (b x^n\right )}{x} \, dx-\sin (a) \int \frac {\sin \left (b x^n\right )}{x} \, dx \\ & = \frac {\cos (a) \operatorname {CosIntegral}\left (b x^n\right )}{n}-\frac {\sin (a) \text {Si}\left (b x^n\right )}{n} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.92 \[ \int \frac {\cos \left (a+b x^n\right )}{x} \, dx=\frac {\cos (a) \operatorname {CosIntegral}\left (b x^n\right )-\sin (a) \text {Si}\left (b x^n\right )}{n} \]

[In]

Integrate[Cos[a + b*x^n]/x,x]

[Out]

(Cos[a]*CosIntegral[b*x^n] - Sin[a]*SinIntegral[b*x^n])/n

Maple [A] (verified)

Time = 1.14 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.96

method result size
derivativedivides \(\frac {-\operatorname {Si}\left (b \,x^{n}\right ) \sin \left (a \right )+\operatorname {Ci}\left (b \,x^{n}\right ) \cos \left (a \right )}{n}\) \(25\)
default \(\frac {-\operatorname {Si}\left (b \,x^{n}\right ) \sin \left (a \right )+\operatorname {Ci}\left (b \,x^{n}\right ) \cos \left (a \right )}{n}\) \(25\)
risch \(\frac {i {\mathrm e}^{-i a} \pi \,\operatorname {csgn}\left (b \,x^{n}\right )}{2 n}-\frac {i {\mathrm e}^{-i a} \operatorname {Si}\left (b \,x^{n}\right )}{n}-\frac {{\mathrm e}^{-i a} \operatorname {Ei}_{1}\left (-i b \,x^{n}\right )}{2 n}-\frac {{\mathrm e}^{i a} \operatorname {Ei}_{1}\left (-i b \,x^{n}\right )}{2 n}\) \(75\)
meijerg \(\frac {\sqrt {\pi }\, \left (\frac {2 \gamma +2 n \ln \left (x \right )+\ln \left (b^{2}\right )}{\sqrt {\pi }}-\frac {2 \gamma }{\sqrt {\pi }}-\frac {2 \ln \left (2\right )}{\sqrt {\pi }}-\frac {2 \ln \left (\frac {b \,x^{n}}{2}\right )}{\sqrt {\pi }}+\frac {2 \,\operatorname {Ci}\left (b \,x^{n}\right )}{\sqrt {\pi }}\right ) \cos \left (a \right )}{2 n}-\frac {\operatorname {Si}\left (b \,x^{n}\right ) \sin \left (a \right )}{n}\) \(79\)

[In]

int(cos(a+b*x^n)/x,x,method=_RETURNVERBOSE)

[Out]

1/n*(-Si(b*x^n)*sin(a)+Ci(b*x^n)*cos(a))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.92 \[ \int \frac {\cos \left (a+b x^n\right )}{x} \, dx=\frac {\cos \left (a\right ) \operatorname {Ci}\left (b x^{n}\right ) - \sin \left (a\right ) \operatorname {Si}\left (b x^{n}\right )}{n} \]

[In]

integrate(cos(a+b*x^n)/x,x, algorithm="fricas")

[Out]

(cos(a)*cos_integral(b*x^n) - sin(a)*sin_integral(b*x^n))/n

Sympy [F]

\[ \int \frac {\cos \left (a+b x^n\right )}{x} \, dx=\int \frac {\cos {\left (a + b x^{n} \right )}}{x}\, dx \]

[In]

integrate(cos(a+b*x**n)/x,x)

[Out]

Integral(cos(a + b*x**n)/x, x)

Maxima [C] (verification not implemented)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 0.40 (sec) , antiderivative size = 90, normalized size of antiderivative = 3.46 \[ \int \frac {\cos \left (a+b x^n\right )}{x} \, dx=\frac {{\left ({\rm Ei}\left (i \, b x^{n}\right ) + {\rm Ei}\left (-i \, b x^{n}\right ) + {\rm Ei}\left (i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right ) + {\rm Ei}\left (-i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right )\right )} \cos \left (a\right ) + {\left (i \, {\rm Ei}\left (i \, b x^{n}\right ) - i \, {\rm Ei}\left (-i \, b x^{n}\right ) + i \, {\rm Ei}\left (i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right ) - i \, {\rm Ei}\left (-i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right )\right )} \sin \left (a\right )}{4 \, n} \]

[In]

integrate(cos(a+b*x^n)/x,x, algorithm="maxima")

[Out]

1/4*((Ei(I*b*x^n) + Ei(-I*b*x^n) + Ei(I*b*e^(n*conjugate(log(x)))) + Ei(-I*b*e^(n*conjugate(log(x)))))*cos(a)
+ (I*Ei(I*b*x^n) - I*Ei(-I*b*x^n) + I*Ei(I*b*e^(n*conjugate(log(x)))) - I*Ei(-I*b*e^(n*conjugate(log(x)))))*si
n(a))/n

Giac [F]

\[ \int \frac {\cos \left (a+b x^n\right )}{x} \, dx=\int { \frac {\cos \left (b x^{n} + a\right )}{x} \,d x } \]

[In]

integrate(cos(a+b*x^n)/x,x, algorithm="giac")

[Out]

integrate(cos(b*x^n + a)/x, x)

Mupad [F(-1)]

Timed out. \[ \int \frac {\cos \left (a+b x^n\right )}{x} \, dx=\int \frac {\cos \left (a+b\,x^n\right )}{x} \,d x \]

[In]

int(cos(a + b*x^n)/x,x)

[Out]

int(cos(a + b*x^n)/x, x)